<template>
    <div class="app">
        <myNavbar title="我的订单"></myNavbar>
        <tabbar
                ref="reflectName"
                class="tabbar"
                tabType="top"
                textSelectColor="red"
                textUnselectColor="black"
                tabBackgroundColor="#f2f2f2"
                :tabPages="tabPages"></tabbar>

    </div>
</template>

<style>
    .app, body {
        background-color: rgba(248, 248, 248, 0.8);
    }

    .app {
        flex: 1
    }

    .tabbar {
        flex: 1;
        width: 750px;
    }
    .navbar {
        width: 750px;
        height: 100px;
    }
    .text {
        font-size: 26px;
    }
</style>

<script>
    import myNavbar from '../../../components/myNavbar/myNavbar.vue'
    export default {
        data() {
            return {
                tabPages: [
                    {
                        title: '全部订单',
                        selectedIcon: 'md-home',
                        url: './component/list.js',
                        tabName:"name"
                    },
                    {
                        title: '待付款',
                        selectedIcon: 'md-contacts',
                        url: './component/paymentList.js',
                        tabName:"payment"
                    },
                    {
                        title: '待发货',
                        selectedIcon: 'md-globe',
                        url: './component/deliveryList.js',
                        tabName:"delivery"
                    },
                    {
                        title: '待收货',
                        selectedIcon: 'md-settings',
                        url: './component/receivedList.js',
                        tabName:"received"
                    },
                    {
                        title: '待评价',
                        selectedIcon: 'md-settings',
                        url: './component/evaluationList.js',
                        tabName:"evaluation"
                    },
                ],
            }
        },
        created() {

        },
        components:{
            myNavbar
        },
        mounted(){
            var _this = this
            if (app.config.params == '0'){
                _this.$refs.reflectName.setCurrentItem('name');
            }else if (app.config.params == '1'){
                _this.$refs.reflectName.setCurrentItem('payment');
            } else if (app.config.params == '2'){
                _this.$refs.reflectName.setCurrentItem('delivery');
            }else if (app.config.params == '3'){
                _this.$refs.reflectName.setCurrentItem('received');
            }else if (app.config.params == '4'){
                _this.$refs.reflectName.setCurrentItem('evaluation');
            }
        },
        methods: {

        }
    };
</script>
